<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=360, initial-scale=0.75 user-scalable=no">
        <title>登录</title>
        <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
    </head>
    <body>
        <div id="wrap">
            <div class="container" id="main">
                <div class="row">
                    <div class="panel panel-default col-md-6 col-md-offset-3">
                        <form class="panel-body" role="form" method="post" action="{{ url_for('home.login', next=request.args.get('next')) }}">
                            <h2 class="text-center" style="margin-bottom:1em"> 用户登录 </h2>
                            <ul class=flashes>
                            {% for message in get_flashed_messages() %}
                              <li>{{ message }}</li>
                            {% endfor %}
                            </ul>
                            {{ form.hidden_tag() }}
                            <div class="form-group ">
                                {{ form.name.label }}
                                {{ form.name }}
                            </div>

                            <div class="form-group ">
                                {{ form.password.label }}
                                <input type="password" name="password" value="{% if form.password.data %}{{ form.password.data }}{% endif %}" />
                            </div>

                            <div class="form-group">
                                {{ form.submit(class="btn btn-default") }}
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <script src="{{ url_for('static', filename='js/jquery.min.js') }}"></script>
        <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
    </body>
</html>
